import React from 'react';
import ReactDOM from 'react-dom';
import Route from './router/router';
// import axios from './common/axios'
import {Provider} from 'react-redux';
import store, {persistor} from './store/index';
import {PersistGate} from 'redux-persist/lib/integration/react';
import './common/rem';
import './style/base.scss';

import * as serviceWorker from './serviceWorker';

// 全局注册axios，
// Component.prototype.$api = axios;

ReactDOM.render(
  <Provider store={store}>
    <PersistGate persistor={persistor}>
      <Route/>
    </PersistGate>
  </Provider>,
  document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
